package com.lantosec.hmrp.modules.internal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.internal.vo.InternalTypeVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 项目分类表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InternalType extends BaseEntity<InternalTypeVO> {

    private static final long serialVersionUID = 1L;
    public InternalType(InternalTypeVO vo){
        this.internalTypeId = vo.getInternalTypeId();
        this.internalTypeName = vo.getInternalTypeName();
        this.typeOrder = vo.getTypeOrder();
    }

    @Override
    public InternalTypeVO convertToVO(){
        return new InternalTypeVO(this);
    }


    /**
     * 项目分类ID
     */
    @TableId(value = "internal_type_id", type = IdType.AUTO)
    private Integer internalTypeId;

    /**
     * 项目分类
     */
    private String internalTypeName;

    /**
     * 排序
     */
    private Integer typeOrder;


    public enum ColName {
        internal_type_id, internal_type_name, type_order, 
    }
}
